<div class="simple_form">
  <form action="/search" method="get">
  <fieldset>
    <div class="form_item">
      <label>Subject</label>
      <input type="text" name="subject" value="<%= params[:subject] %>" />
    </div>

    <div class="form_item">
      <label>Project</label>
      <select name="project">
        <option value=""></option>
	<% for project in @projects %>
	 <option value="<%= project.project_id %>"<% if params[:project] == project.project_id.to_s %> selected="selected"<% end %>><%= project.name %></option>
	<% end %>
      </select>
    </div>

    <div class="form_item">
      <label>Requestor</label>
      <input type="text" name="requestor" value="<%= params[:requestor] %>" />
    </div> 

    <div class="form_item">
      <label>Owner</label>
      <select name="owner">
        <option value=""></option>
	<% for user in @users %>
	  <option value="<%= user.user_id %>"<% if params[:owner] == user.user_id.to_s %> selected="selected"<% end %>><%= user.username %></option>
	<% end %>
      </select>
    </div>

    <div class="form_item">
      <label>Status</label>
      <select name="status">
        <option value=""></option>
	<% for status in @statuses %>
	  <option value="<%= status.status_task_id %>"<% if params[:status] == status.status_task_id.to_s %> selected="selected"<% end %>><%= status.name %></option>
	<% end %>
      </select>
    </div>
 </fieldset>
 <fieldset>
<!--    <div class="form_item">
      <label>Created</label>
      <select name="start_created">
      </select>
    </div>

    <div class="form_item">
      <label>Created</label>
      <select name="end_created">
      </select>
    </div>
-->
    <div class="form_item">
      <label>Priority</label>
      <select name="priority">
        <option value=""></option>
	<% for priority in (1..10) %>
	  <option value="<%= priority %>"<% if params[:priority] == priority.to_s %> selected="selected"<% end %>><%= priority %></option>
	<% end %>
      </select>
    </div>

    <div class="form_item">
      <label>Time worked</label>
      <input type="text" name="time_worked" value="<%= params[:time_worked] %>" />
    </div>
 </fieldset>

    <div class="form_item submit">
      <input type="submit" name="do" value="Search" />
    </div>
  </form>
</div>
